const signalSelectList = [
    {
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsDRL"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x180",
        "sigName": "Sound"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x179",
        "sigName": "Smoke"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x178",
        "sigName": "Pressure"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x177",
        "sigName": "Internal_Resistance"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x176",
        "sigName": "Voltage"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x175",
        "sigName": "Temp_Max"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x174",
        "sigName": "Temp_Avg"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr19",
        "frameIdOriginal": "0x173",
        "sigName": "Steering_Angle"
    },
    {
        "frame": "DhuZCUCANFD2Fr11",
        "frameIdOriginal": "0x172",
        "sigName": "Ax"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr07",
        "frameIdOriginal": "0x171",
        "sigName": "Abs"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr07",
        "frameIdOriginal": "0x170",
        "sigName": "Dashboard_Fuel_Used"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr07",
        "frameIdOriginal": "0x169",
        "sigName": "Fuel_Consumption_Rate"
    },
    {
        "frame": "DhuZCUCANFD2Fr15",
        "frameIdOriginal": "0x168",
        "sigName": "Brake_Pedal_Position"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr06",
        "frameIdOriginal": "0x167",
        "sigName": "Accelerator_Pedal_Spening_Angle"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr17",
        "frameIdOriginal": "0x166",
        "sigName": "Engine_Torque"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr23",
        "frameIdOriginal": "0x165",
        "sigName": "Engine_Rpm"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr02",
        "frameIdOriginal": "0x164",
        "sigName": "Acceleration"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr32",
        "frameIdOriginal": "0x163",
        "sigName": "Odometer_Mileage"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr32",
        "frameIdOriginal": "0x162",
        "sigName": "Engineencoolant_Temperature"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr32",
        "frameIdOriginal": "0x161",
        "sigName": "Speed"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr13",
        "frameIdOriginal": "0x160",
        "sigName": "Angle"
    },
    {
        "frame": "ZCUDZCUCANFD2Fr13",
        "frameIdOriginal": "0x159",
        "sigName": "Altitude"
    },
    {
        "frame": "DhuZCUCANFD2Fr03",
        "frameIdOriginal": "0x158",
        "sigName": "Longtitude"
    },
    {
        "frame": "DhuZCUCANFD2Fr03",
        "frameIdOriginal": "0x157",
        "sigName": "Latitude"
    }
]

const stringArray = [
    {
        "signal": "ZCU_CANFD1.0x105.TrSts",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x105",
        "sigName": "TrSts"
    },
    {
        "signal": "ZCU_CANFD2.0x138.LVPwrSplyErrSts",
        "frame": "ZCU_CANFD2",
        "frameIdOriginal": "0x138",
        "sigName": "LVPwrSplyErrSts"
    },
    {
        "signal": "ZCU_CANFD2.0x491.BattRRaw",
        "frame": "ZCU_CANFD2",
        "frameIdOriginal": "0x491",
        "sigName": "BattRRaw"
    },
    {
        "signal": "ZCU_CANFD2.0x491.EgyMeas",
        "frame": "ZCU_CANFD2",
        "frameIdOriginal": "0x491",
        "sigName": "EgyMeas"
    },
    {
        "signal": "ZCU_CANFD2.0x372.ClimaActvAlrmSts",
        "frame": "ZCU_CANFD2",
        "frameIdOriginal": "0x372",
        "sigName": "ClimaActvAlrmSts"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsLoBeam",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsLoBeam"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsPosLiFrnt",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsPosLiFrnt"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsPosLiRe",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsPosLiRe"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsFlash",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsFlash"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsTurnIndrRi",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsTurnIndrRi"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsTurnIndrLe",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsTurnIndrLe"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsStopLi",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsStopLi"
    },
    {
        "signal": "ZCU_CANFD1.0x1C3.ExtrLtgStsDRL",
        "frame": "ZCU_CANFD1",
        "frameIdOriginal": "0x1C3",
        "sigName": "ExtrLtgStsDRL"
    }
]
// // 计算 stringArray 中不包含在 signalSelectList 中的项的数量
// const unmatchedCount = stringArray.filter(filterItem => {
//     // 解构 filterItem 以简化访问属性
//     const { frame, frameIdOriginal, sigName } = filterItem;
//     // 检查 signalSelectList 中是否存在与 filterItem 匹配的项
//     return !signalSelectList.some(dataItem => {
//         const { frame: dataFrame, frameIdOriginal: dataFrameIdOriginal, sigName: dataSigName } = dataItem;
//         return frame === dataFrame && frameIdOriginal === dataFrameIdOriginal && sigName === dataSigName;
//     });
// }).length;

// // 输出不匹配的数据数量
// console.log(`不匹配的数据数量: ${unmatchedCount}`);

const newData = stringArray.map(item => item.signal).join(',');
console.log(newData);